#ifndef TSCPRINTER_H
#define TSCPRINTER_H

#include <QObject>
#include <QLibrary>

typedef int (*TSCopenport)(char*);
typedef int (*TSCabout)(char*);
typedef int (*TSCsendcommand)(char*);
typedef int (*TSCcloseport)();
typedef char* (*TSCusbprintername)();

class TscPrinter : public QObject
{
    Q_OBJECT
public:
    explicit TscPrinter(QObject *parent = nullptr);

    int About();
    int OpenPort();
    int ClosePort();
    int SendCommand();
    QString UsbPrinterName();


private:
    QLibrary tscdll;
    bool isSuccess;

    TSCabout about;
    TSCopenport openport;
    TSCcloseport closeport;
    TSCsendcommand sendcommand;
    TSCusbprintername usbprintername;


signals:
};

#endif // TSCPRINTER_H
